import java.text.NumberFormat;
import java.util.Locale;


public class FormatTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		testNumberFormat();
	}

	private static void testNumberFormat() {
		
        NumberFormat format = NumberFormat.getNumberInstance(Locale.US);
        format.setMaximumFractionDigits(6);
        format.setGroupingUsed(false);

        Object objToFormat = (Object) new String("1006254");
        String formattedString = format.format(new Integer(1006254));
        //String formattedString = format.format(1006254);        
        //String formattedString = format.format(objToFormat);
        System.out.println("formatted string: " + formattedString);
	}
	
}
